// 初始化用户模块的state
const initialState = {};

export const user = (state = initialState, action) => {
  // 将用户信息存入 user 模块
  if (action.type === 'user/getUserInfo') {
    console.log(action);
    return action.payload;
  }
  // 清空用户信息
  if (action.type === 'user/clearInfo') {
    return {};
  }

  return state;
};
